export function requestFullScreen(element) {
  if (element.requestFullscreen) {
    element.requestFullscreen();
  } else if (element['webkitRequestFullscreen']) {
    element['webkitRequestFullscreen']();
  }
}
export function isFullScreenSupported(document) {
  const body = document.body;
  return !!(body['webkitRequestFullscreen'] || (body.requestFullscreen && document.fullscreenEnabled));
}

export function isFullScreen(document) {
  return !!(document['webkitIsFullScreen'] || document.fullscreenElement);
}

export function exitFullScreen(document) {
  if (document.exitFullscreen) {
    document.exitFullscreen();
  } else if (document['webkitExitFullscreen']) {
    document['webkitExitFullscreen']();
  }
}